package ioc

import (
	"fmt"
	"github.com/spf13/viper"
)

func YamlConfigInitialization() *viper.Viper {
	v := viper.New()
	v.SetConfigName("config")
	v.SetConfigType("yaml")
	v.AddConfigPath("config")
	if err := v.ReadInConfig(); err != nil {
		fmt.Printf("Error reading config file, %s", err)
	}
	return v
}
